package com.tencent.stat;

import android.content.Context;
import com.tencent.stat.common.StatLogger;
import com.tencent.stat.event.e;
import com.tencent.stat.event.j;
import java.util.Map;

final class ah
  implements Runnable
{
  public final void run()
  {
    try
    {
      StatServiceImpl.flushDataToDB(this.a);
      synchronized (StatServiceImpl.h())
      {
        Object localObject2 = (Long)StatServiceImpl.h().remove(this.b);
        if (localObject2 == null)
          break label191;
        localObject2 = Long.valueOf((System.currentTimeMillis() - ((Long)localObject2).longValue()) / 1000L);
        ??? = localObject2;
        if (((Long)localObject2).longValue() > 0L)
          break label67;
        ??? = Long.valueOf(1L);
        label67: String str = StatServiceImpl.j();
        localObject2 = str;
        if (str == null)
          break label94;
        localObject2 = str;
        if (str.equals(this.b) != true)
          break label94;
        localObject2 = "-";
        label94: ??? = new j(this.a, (String)localObject2, this.b, StatServiceImpl.a(this.a, false, this.c), (Long)???, this.c);
        if (this.b.equals(StatServiceImpl.i()))
          break label149;
        StatServiceImpl.f().warn("Invalid invocation since previous onResume on diff page.");
        label149: new as((e)???).a();
        StatServiceImpl.c(this.b);
        return;
      }
    }
    catch (Throwable localThrowable)
    {
      StatServiceImpl.f().e(localThrowable);
      StatServiceImpl.a(this.a, localThrowable);
      return;
    }
    label191: StatServiceImpl.f().e("Starttime for PageID:" + this.b + " not found, lost onResume()?");
  }
}